package com.yu.xcx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yu.xcx.entity.ShopFollow;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ShopFollowMapper extends BaseMapper<ShopFollow> {

    @Select("select count(*) from tb_shop_follow where user_id = \"${userId}\"")
    Integer getCountByUser(Integer userId);

    @Select("select shop_id from tb_shop_follow where user_id = \"${userId}\"")
    List<Integer> getShopByUser(Integer userId);

}
